package com.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mapper.auto.MendaoTopicLibraryMapper;
import com.model.auto.MendaoTopicLibrary;
import com.service.IMendaoTopicLibraryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author astupidcoder
 * @since 2022-09-14
 */
@Service
public class MendaoTopicLibraryServiceImpl extends ServiceImpl<MendaoTopicLibraryMapper, MendaoTopicLibrary> implements IMendaoTopicLibraryService {
    @Autowired
    private MendaoTopicLibraryMapper topicLibraryMapper;

    @Override
    public MendaoTopicLibrary findOne(Long id) {
        return topicLibraryMapper.findOne(id);
    }

    @Override
    public List<MendaoTopicLibrary> getListByTestId(long testId) {
        return topicLibraryMapper.getListByTestId(testId);
    }

    @Override
    public void insertDate(MendaoTopicLibrary topicLibrary) {
        topicLibraryMapper.insertDate(topicLibrary);
    }

    @Override
    public void updateDate(MendaoTopicLibrary topicLibrary) {
        topicLibraryMapper.updateDate(topicLibrary);
    }

    @Override
    public void deleteByTestId(long testId) {
        topicLibraryMapper.deleteByTestId(testId);
    }
}
